<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/app.css" />
		<style>
			#content img {
				max-width: 100%;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title"></h1>
		</header>
		<div class="mui-content" style="background-color: white;">
			<div class="mui-content-padded">
				<h4 id="title"></h4>
				<div id="time" style="color: gray; margin: 10px 0;"></div>
				<p id="content"></p>
			</div>
		</div>
		<script src="js/mui.min.js"></script>
		<script src="js/zepto.min.js"></script>
		<script src="js/underscore.js"></script>
		<script src="js/common.js"></script>
		<script>
			mui.init({
				swipeBack:true
			});
			mui.plusReady(function(){
				var url = plus.webview.currentWebview().url;
				var w = Common.showWaiting();
				$.ajax({
					url: Common.api + '/newsDetail',
					async: false,
					cache: false,
					method: 'get',
					dataType: 'json',
					data: {
						url: url
					},
					success: function(data) {
						$(".mui-title").html(data.title);
						$("#title").html(data.title);
						$("#time").html(data.time);
						$("#content").html(data.content);
						Common.closeWaiting(w);	
					}
				});
			});
		</script>
	</body>

</html>
